/*
 * @Author       : xiaowu wwl093000@163.com
 * @Date         : 2023-05-05 15:48:06
 * @LastEditTime : 2023-05-06 09:57:06
 * @LastEditors  : xiaowu wwl093000@163.com
 * @FilePath     : /erp-admin-ui/src/api/workorder/index.js
 * @Description  : -
 */
import request from '@/utils/request'

// 提交工单
export function addWorkOrder(data) {
  return request({
    url: '/purchase/workOrder/add',
    method: 'post',
    data: data
  })
}

// 工单列表
export function getWorkOrderList(query) {
  return request({
    url: '/purchase/workOrder/list',
    method: 'get',
    params: query
  })
}

// 工单详情
export function getWorkOrderDetails(id) {
  return request({
    url: '/purchase/workOrder/' + id,
    method: 'get'
  })
}

// 追加问题
export function addWorkRecords(data) {
  return request({
    url: '/purchase/workOrderRecords/add',
    method: 'post',
    data: data
  })
}

// 确认解决问题
export function confirmSolve(data) {
  return request({
    url: '/purchase/workOrder/confirmSolve',
    method: 'post',
    data: data
  })
}